<html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>Table</title>
		<link rel="stylesheet" href="__STATIC__/plugins/layui/css/layui.css" media="all" />
		<link rel="stylesheet" href="__CSS__/global.css" media="all">
		<link rel="stylesheet" href="__STATIC__/plugins/font-awesome/css/font-awesome.min.css">
		<link rel="stylesheet" href="__CSS__/table.css" />
	    <script type="text/javascript" charset="utf-8" src="__JS__/ueditor.config.js"></script>
	    <script type="text/javascript" charset="utf-8" src="__JS__/ueditor.all.min.js"> </script>
        <script type="text/javascript" charset="utf-8" src="__JS__/lang/zh-cn/zh-cn.js"></script>



	</head>
	<body>
		<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
				<legend>
				  	{if  condition="($arr.id)"}
			       
				编辑文章
		  			{else/}
				添加文章
		  			{/if}
			</legend>
		</fieldset>
		<form action="__ADMIN__/article/add" method="post">
			<div class="layui-form-item">
					<label class="layui-form-label">图片:</label>
					<div class="layui-input-block">
						<input name="da[img]" id="ico" lay-verify="title" autocomplete="off" placeholder="" class="layui-input" value="{$arr.img}" type="text">
				  	<button type="button" class="layui-btn test1"res = "ico" style="float: right;" >选择图片</button>
				  	<div id="ico_img">
				  		{if  condition="($arr.img)"}
				  		<img src="__STATIC__/{$arr.img}" url="{$arr.img}" width="100px" height="100px">
				  		{/if}
				  	</div>
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">标题:</label>
					<div class="layui-input-block">
						<input name="da[title]" lay-verify="title" autocomplete="off" placeholder="" value="{$arr.title}" class="layui-input" type="text">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">简介:</label>
					<div class="layui-input-block">
						<input name="da[jianjie]" lay-verify="title" autocomplete="off" placeholder="" value="{$arr.jianjie}" class="layui-input" type="text">
					</div>
				</div>
				
				<div class="layui-form-item layui-form-text">
					<label class="layui-form-label">内容</label>
					<div class="layui-input-block">
						<textarea class="content" name="da[content]" id="content">{$arr.content}</textarea>
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">浏览量:</label>
					<div class="layui-input-block">
						<input name="da[view]"  lay-verify="title" autocomplete="off" value="{$arr.view}" placeholder="" class="layui-input" type="text">
					</div>
				</div>

				  <div class="layui-form-item">
				    <label class="layui-form-label">栏目</label>
				    <div class="layui-input-block">
				      <select name="da[lanmu]" class="form-control">     
                  	    <option value="0" selected>首页</option>
              	        <option value="1">每日更新</option>
                        <option value="2">精华必看</option>
                        <option value="3">优惠精选</option>
                        <option value="-2">隐藏栏目</option>
                        <option value="-3">系统公告</option>
                        <option value="-4">推广攻略</option>
                    </select>
				    </div>
				  </div> 
			  	  <div class="layui-form-item">
				    <label class="layui-form-label">查看等级</label>
				    <div class="layui-input-block">
				    <select name="da[level]" class="form-control">
                        <option value="0" selected="">全部</option>
                        <option value="1">专员以上</option>
                        <option value="2">经理以上</option>
                        <option value="3">银行家</option>
                    </select>
				    </div>
				  </div> 
				<input type="hidden" name="id" value="{$arr.id}">
				<div class="layui-input-block">
					<input type="submit" class="layui-btn" value="提交">
				</div>
		</form>
		<script type="text/javascript" src="__STATIC__/plugins/layui/layui.js"></script>
			<script type="text/javascript" src="__STATIC__/datas/nav.js"></script>	
			<script src="__JS__/index.js"></script>
		    <script src="__JS__/jquery.js"></script>
	</body>
</html>
<script >
	layui.config({
			base: '__STATIC__/plugins/layui/modules/'
		});

		layui.use(['form', 'layedit', 'laydate','icheck', 'laypage','layer'], function() {
		var 	layer = layui.layer,
			layedit = layui.layedit,
			laydate = layui.laydate;


		var editIndex = layedit.build('LAY_demo_editor');

		 $('.test1').on('click', function() {
		 	var type = $(this).attr("res");
			  layer.open({
			      type: 2,
				      title: '图片',
				      maxmin: true,
				      offset: 't',
				      anim: 2,
				      shadeClose: true, //点击遮罩关闭层
			      area : ['600px' , '520px'],
			      content: '__ADMIN__/bank/img?type='+type
			   });
		 });

		})

</script>
  <script type="text/javascript">
        UE.getEditor('content',{initialFrameWidth:800,initialFrameHeight:200})
        UE.getEditor('xiangqing',{initialFrameWidth:800,initialFrameHeight:200})
        UE.getEditor('zhinan',{initialFrameWidth:800,initialFrameHeight:200})
</script>